#!/bin/sh
route=$(pwd) 

sudo tar zxvf ./wsdl_file.tar.gz

#build gsoap
sudo ./wsdl2h -o ./src/host.h ./Host.wsdl
cd ./src
sudo ../soapcpp2 -i ./host.h -S -I../import
cd ..


ln -s $route/nagent/main.cpp $route/src/main.cpp

ln -s $route/host/soapHostSoap12Service.code.cpp $route/src/soapHostSoap12Service.code.cpp
ln -s $route/host/soapHostSoap12ServiceImpl.cpp $route/src/soapHostSoap12ServiceImpl.cpp
ln -s $route/host/soapHostSoap12ServiceImpl.h $route/src/soapHostSoap12ServiceImpl.h

ln -s $route/commonlib/ConsoleLogListener.h $route/src/ConsoleLogListener.h
ln -s $route/commonlib/SystemInfo.h $route/src/SystemInfo.h
ln -s $route/commonlib/DateTime.h $route/src/DateTime.h
ln -s $route/commonlib/Log.h $route/src/Log.h
ln -s $route/commonlib/LogListener.h $route/src/LogListener.h
ln -s $route/commonlib/misc.h $route/src/misc.h
ln -s $route/commonlib/netcare.h $route/src/netcare.h
ln -s $route/commonlib/ns.h $route/src/ns.h
ln -s $route/commonlib/Process.h $route/src/Process.h
ln -s $route/commonlib/TextWriterLogListener.h $route/src/TextWriterLogListener.h
ln -s $route/commonlib/OSoperation.h $route/src/OSoperation.h
ln -s $route/commonlib/Serviceoperation.h $route/src/Serviceoperation.h
ln -s $route/commonlib/MemoryRelease.h $route/src/MemoryRelease.h
ln -s $route/commonlib/DiskRelease.h $route/src/DiskRelease.h
ln -s $route/commonlib/ConsoleLogListener.cpp $route/src/ConsoleLogListener.cpp
ln -s $route/commonlib/SystemInfo.cpp $route/src/SystemInfo.cpp
ln -s $route/commonlib/DateTime.cpp $route/src/DateTime.cpp
ln -s $route/commonlib/Log.cpp $route/src/Log.cpp
ln -s $route/commonlib/LogListener.cpp $route/src/LogListener.cpp
ln -s $route/commonlib/Process.cpp $route/src/Process.cpp
ln -s $route/commonlib/TextWriterLogListener.cpp $route/src/TextWriterLogListener.cpp
ln -s $route/commonlib/OSoperation.cpp $route/src/OSoperation.cpp
ln -s $route/commonlib/Serviceoperation.cpp $route/src/Serviceoperation.cpp
ln -s $route/commonlib/MemoryRelease.cpp $route/src/MemoryRelease.cpp
ln -s $route/commonlib/DiskRelease.cpp $route/src/DiskRelease.cpp
ln -s $route/commonlib/SharedInfo.rs $route/src/SharedInfo.rs


mkdir obj



